package Datastructure;

import Datastructure.Entry;

public class Entry {

	
	private int position;//row or column of the entry
	private double value;// value of the entry
	
	
	public Entry(int pos, double val){
		this.position=pos;
		this.value=val;
	}
	
	
	/**
	 * return the position of the entry
	 * depending on how the matrix is created, this will be the row or the column
	 * @return the position on the entry
	 */
	public int getPosition() {
		return position;
	}
	
	/**
	 * change the position of the entry
	 * @param position new position
	 */
	public void setPosition(int position) {
		this.position = position;
	}
	
	/**
	 * return the value of the entry
	 * @return value of the entry
	 */
	public double getValue() {
		return value;
	}
	
	/**
	 * change the value of the entry
	 * @param value new value
	 */
	public void setValue(double value) {
		this.value = value;
	}
	
	public Entry copy(){
		Entry e=new Entry(this.position, this.value);
		return e;
	}
	
	
	
}
